package BDLayer;

import java.util.List;

import modelLayer.Person;

public interface IFDBPerson {
	
	//return list of type Person 
	public List<Person> getAllPerson(boolean retriveAssociation);
	
	//return List of type Person by type
	public List<Person> getAllPersonByType(String type, boolean retriveAssociation);
	
	//return object of type Person by id
	public Person getPersonById(int pid, boolean retriveAssociation);
	
	//return list of type Person by fname
	public List<Person> getPersonByFname(String fname, boolean retriveAssociation);
	
	//return list of type Person by lname
	public List<Person> getPersonByLname(String lname, boolean retriveAssociation);
	
	//return List of type Person by address
	public List<Person> getPersonByAddress(String address, boolean retriveAssociation);
	
	//return list of type Person by postalCode
	public List<Person> getPersonByPostalCode(String postalCode, boolean retriveAssociation);
	
	//return object of type Person by initial
//	public Person getPersonByInitial(String wClause, boolean retriveAssociation);
	
	
	

	//insert person in db
	//return 1 if ok, -1 if failed
	public int insertPerson(Person personObj, boolean retriveAssociation) throws Exception;
	
	//update person in db
	//return 1 if ok, -1 if failed
	public int updatePerson(Person personObj, boolean retriveAssociationn) throws Exception;
	
	//delete person in db
	//return 1 if ok, -1 if failed
	public int deletePerson(Person personObj, boolean retriveAssociation) throws Exception;
}
